#ifndef APP_H
#define APP_H

#pragma once

#include <ChatClient.h>
#include "TcpClient.h"
#include <QThread>

class App
    : public ChatClient {
    Q_OBJECT
private:
    QThread *thread = nullptr;
    TcpClient *tcpClient = nullptr;

public:
    App(QObject* parent = nullptr);
    ~App();

protected:
    virtual void send(packge::Packge& pack);

protected slots:
    void onPacket(std::shared_ptr<packge::Packge> pack);

public slots:
    void onLogin(data::UserInfo userInfo, int code, QString message);
};


#endif